package ch.yoursource.StartPageBuilder;

import java.io.File;

public class Loader {
    public static String[][] loadSettings() {
        File source = Toolbox.selectFile();
        String fContent = Toolbox.readFile(source);
        String settings = fContent.split("#SETTING#")[1];
        String[] lines = settings.split("#ENTRY#");
        String[][] retArr = new String[lines.length][3];
        for(int i=0;i<lines.length;i++) {
            String line[] = lines[i].split(";");
            for(int j=0;j<3;j++){
                retArr[i][j] = line[j];
            }
        }
        return retArr;
    }
}